#include <iostream>
#include <string>
#include <cstring>
using namespace std;
int main()
{
    string s;
    while (cin >> s)
    {

        for (int i = 0; i < s.size() - 1; ++i)
        {
            bool first = false;
            if (s[i] == '*')
                continue;
            for (int j = i + 1; j < s.size(); ++j)
            {
                if (s[i] == s[j])
                {
                    if (!first)
                    {
                        cout << s[i] << ":" << i;
                        first = true;
                    }
                    cout << "," << s[j] << ":" << j;
                    s[j] = '*';
                }
            }
            if (first)
            {
                cout << endl;
            }
        }

    }
}
